Skip to content

Fix: resolve calculator logic and UI bugs [Issue]#399#717

Merged
steam-bell-92 merged 1 commit into
steam-bell-92:mainfrom
Sanjhivvarshan-b-s:fix-calculator-new
May 24, 2026
Merged

Fix: resolve calculator logic and UI bugs [Issue]#399#717
steam-bell-92 merged 1 commit into
steam-bell-92:mainfrom
Sanjhivvarshan-b-s:fix-calculator-new

Conversation

@Sanjhivvarshan-b-s
Copy link
Copy Markdown
Contributor

📝 Description

This PR resolves critical logic bugs and UI edge cases within the calculator.js component. I have made changes to the files and added some extra features as well.

What I Fixed:

  1. Fixed the "Error" screen: The calculator now automatically resets if you try to type a new number after getting an error.
  2. Fixed crashing: Stopped the calculator from breaking if you press a math button (like sin or sqrt) before finishing an equation.
  3. Fixed trigonometry math: Updated sin, cos, and tan to use standard degrees instead of radians so they give the right answers.
  4. Fixed display symbols: Made the screen show proper math symbols (× and ÷) instead of computer code symbols (* and /).
  5. Fixed keyboard glitch: Stopped a background bug that was causing the calculator to type numbers twice when using your keyboard.

🔗 Linked Issue

Closes #399


📋 Contribution Checklist

  • My code strictly adheres to the project guidelines (Standard library only, procedural code, clean spacing).
  • I have verified that my files are placed in the correct directory.
  • I have tested my changes thoroughly on my local machine.
  • I have included interactive emojis and clean console/UI outputs.
  • GSSoC 2026: I have been formally assigned to this issue and noted it above.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 2026

@Sanjhivvarshan-b-s is attempting to deploy a commit to the Anuj's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Sanjhivvarshan-b-s
Copy link
Copy Markdown
Contributor Author

Hi @steam-bell-92 I've made all the changes and bug fixes and submitted the PR.

@Sanjhivvarshan-b-s Sanjhivvarshan-b-s changed the title Fix: resolve calculator logic and UI bugs Fix: resolve calculator logic and UI bugs [Issue]#399 May 24, 2026
@steam-bell-92 steam-bell-92 merged commit ee58242 into steam-bell-92:main May 24, 2026
7 of 11 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎉 Thank you for your contribution!

Your Pull Request has been merged successfully.

We appreciate the time and effort you put into improving this project. Contributions like yours help the repository grow and stay useful for everyone.

If you'd like to contribute again, please check the open issues and make sure you are assigned before opening another Pull Request.

Thanks again for your support! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 [Bug]: Multiple logic and UI edge cases in Ultra Pro Calculator

2 participants